using System.Data;
using ET;
namespace DAL
{
    public class LockWarehouse_Detail_DAL
    {
        private static readonly clsConnect cls = new clsConnect();

        #region Getdata
        public DataTable BindGirdtb_LockWarehouse_Detail(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@LockWarehouse_ID", id);
            return cls.GetData("sp_tb_LockWarehouse_Detail_SelectAll");
        }
        public DataTable BindGirdtb_LockWarehouse_DetailDetail(int id)
        {
            return null;
        }
        #endregion

        #region Insert
        public bool Inserttb_LockWarehouse_Detail(LockWarehouse_Detail_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@LockWarehouse_ID", data.LockWarehouse_ID);
            cls.AddParameter("@Warehouse_ID", data.Warehouse_ID);
            cls.AddParameter("@LockWarehouse_Detail_TD", data.LockWarehouse_Detail_TD);
            cls.AddParameter("@LockWarehouse_Detail_NTK", data.LockWarehouse_Detail_NTK);
            cls.AddParameter("@LockWarehouse_Detail_XTK", data.LockWarehouse_Detail_XTK);
            cls.AddParameter("@LockWarehouse_Detail_TC", data.LockWarehouse_Detail_TC);
            cls.AddParameter("@LockWarehouse_Detail_Test", data.LockWarehouse_Detail_Test);
            cls.AddParameter("@LockWarehouse_Detail_TestName", data.LockWarehouse_Detail_TestName);
            return cls.ExecuteNonQuery("sp_tb_LockWarehouse_Detail_Insert");
        }
        #endregion

        #region Update
        public bool Updatetb_LockWarehouse_Detail(LockWarehouse_Detail_ET data)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("@LockWarehouse_Detail_ID", data.LockWarehouse_Detail_ID);
            cls.AddParameter("@LockWarehouse_ID", data.Warehouse_ID);
            cls.AddParameter("@Warehouse_ID", data.Warehouse_ID);
            cls.AddParameter("@LockWarehouse_Detail_TD", data.LockWarehouse_Detail_TD);
            cls.AddParameter("@LockWarehouse_Detail_NTK", data.LockWarehouse_Detail_NTK);
            cls.AddParameter("@LockWarehouse_Detail_XTK", data.LockWarehouse_Detail_XTK);
            cls.AddParameter("@LockWarehouse_Detail_TC", data.LockWarehouse_Detail_TC);
            cls.AddParameter("@LockWarehouse_Detail_Test", data.LockWarehouse_Detail_Test);
            cls.AddParameter("@LockWarehouse_Detail_TestName", data.LockWarehouse_Detail_TestName);
            return cls.ExecuteNonQuery("sp_tb_LockWarehouse_Detail_Update");
        }
        #endregion

        #region Delete
        public bool Deletetb_LockWarehouse_Detail(int id)
        {
            cls.CreateNewSqlCommand();
            cls.AddParameter("LockWarehouse_Detail_ID", id);
            cls.ExecuteNonQuery("sp_tb_LockWarehouse_Detail_Delete");
            return true;
        }
        #endregion
    }
}